import java.util.HashMap;
import java.util.Set;
import java.util.Scanner;
public class Cat1Test {
    public static void main(String[] args) {
        HashMap<Cat1, String> map=new HashMap<>();
        Scanner in=new Scanner(System.in);
        Cat1 a=new Cat1();
//        Cat1 a1=new Cat1("cat","猫");
//        Cat1 a2=new Cat1("dog","狗");
//        Cat1 a3=new Cat1("man","人");
        System.out.println("请输入：");
        String b=in.next();
        map.put(new Cat1("cat","猫"),"猫");
        map.put(new Cat1("dog","狗"),"狗");
        map.put(new Cat1("man","人"),"人");
        Set<Cat1> set = map.keySet();
        for(Cat1 key : set) {
            if(b.equals(map.values()))
                System.out.println(key+ ", 对应 : " + map.get(key));
            else
                break;
        }
        System.out.println("*********************************************");
        map.put(new Cat1("cat","猫"),"cat");
        map.put(new Cat1("dog","狗"),"dog");
        map.put(new Cat1("man","人"),"man");
        for(Cat1 key : set) {
                System.out.println(map.values()+ ", 对应 : " + map.get(key));
        }
    }
}
